package com.yangmin.springcloud.service;

import com.yangmin.springcloud.service.impl.PaymentHystrixHandlerService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT8001", fallback = PaymentHystrixHandlerService.class)
public interface PaymentHystrixService {
    @GetMapping("/payment/hystrix/ok/{id}")
    String paymentHistrixInfo_OK(@PathVariable("id") Integer id);

    @GetMapping("/payment/hystrix/outtime/{id}")
    String paymentHistrixInfo_Outtime(@PathVariable("id") Integer id);

}
